<?php
/* 拍卖插件 - 页面嵌入
* @Author: ldm
* @Date:   2014-05-31 18:26:35
* @Last Modified by:   ldm
* @Last Modified time: 2014-06-02 01:42:52
*/


// error_reporting(E_ALL & E_STRICT);
// 全局嵌入类
class plugin_iweitao_paipai {
	
}
class plugin_iweitao_paipai_portal extends plugin_iweitao_paipai{
	function __construct(){
		
	}
	// 竞拍嵌入点
	function index_bottom(){
		require_once "paipai.class.php";
		$pclass = new threadplugin_iweitao_paipai();
		// 获得
		$deal = $pclass->get_deal_orders_width_buy(" a.status=1","5");
		$deal_data = '';
		if($deal){
			foreach ($deal as $k => $v) {

				if($k==0){
					$deal_data .= '<div class="active item" style="width=:730px;height:375px;overflow:hidden;">';
				}else{
					$deal_data .= '<div class="item" style="width=:730px;height:375px;overflow:hidden;">';

				}
				$deal_data .= '<a target="_blank" href="forum.php?mod=viewthread&tid='.$v['tid'].'"><img width="730" src="data/attachment/forum/'.$v['focus'].'" alt="" /></a>';
				$deal_data .= '<div class="carousel-caption">
	              <h4>'.$v['title'].'</h4>
	              <p>
					拍卖时间: '.date("Y-m-d H:i",$v['date_start']).' 至 '.date("Y-m-d H:i",$v['date_end']).'
	              </p>
	            </div>';
				$deal_data .= '</div>';

				
			}
		}
		// echo "<pre>";
		// print_r($deal);
		include template("iweitao_paipai:portal_index:");
		return $return;
	}
}

?>